package com.admin.education.models;

import com.admin.education.repositories.Identifiable;
import com.alibaba.fastjson.annotation.JSONField;
import lombok.Data;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;

import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;

@Entity
@Table(name = "user_records")
@EntityListeners(AuditingEntityListener.class)
@Data
public class UserRecords implements Serializable,Identifiable {
    @Column(name = "id")
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private long id;
    @OneToOne
    @JSONField(serialize = false)
    private UserInformation userInformation;
    @Column(name="record")
    private String record;
    @Column(name = "create_time")
    private Date createTime;
}
